<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="com.chanyachting.emall.util.*"%>
<%@ page import="com.chanyachting.emall.domain.*" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<h2><span class="blue">展览赛事</span></h2>
      <div class="tab_menu">
        <ul>
          <li onclick="callMatchServer(0);">游艇展览</li>
          <li class="selected">帆船赛事</li>
        </ul>
      </div>
      <div class="tab_box">
        <div>
          <div class="exhibition">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <logic:notEmpty name="exhibitionForm" property="matchList">
              <th>赛事名称</th>
              <th>国家</th>
              <th>城市</th>
              <th>日期</th>
              </logic:notEmpty>
              <logic:empty name="exhibitionForm" property="matchList">
              <th>&nbsp;</th>
              <th>&nbsp;</th>
              <th>&nbsp;</th>
              <th>&nbsp;</th>
			  </logic:empty>
            </tr>
            <logic:iterate id="exhibitions" name="exhibitionForm" property="matchList" indexId="i">
            <% String hasStyle = "class=\"light\""; if(i % 2 == 1) { hasStyle = "";}  %>
            <bean:define id="compName" name="exhibitions" property="key"/>
   		    <% 
   		    	String cName = compName.toString();
   		    	int scId = cName.lastIndexOf("&");
   		    	cName = cName.substring(0,scId);
   		    %>
   		    <bean:define id="exhibition" name="exhibitions" property="value"/>
   		    <bean:define id="stateId" name="exhibition" property="state"/>
   		    <bean:define id="areaId" name="exhibition" property="area"/>
            <% String stateStr = CodeMap.getStateByKey(stateId.toString()); %>
            <% String areaStr = CodeMap.getToJobAreaByKey(areaId.toString()); %>
            <tr>
              <td <%=hasStyle %>><a href="/chinayachting/frontend/exhibition/ReadOneExhibition2.do?channelId=${exhibitionForm.channelId}&exhibitionId=${exhibitions.value.id}"><%=cName %></a></td>
              <td <%=hasStyle %>><%=stateStr %></td>
              <td <%=hasStyle %>><%=areaStr %></td>
              <td <%=hasStyle %>>${exhibitions.value.beginDate}</td>
            </tr>
            </logic:iterate>
            <logic:empty name="exhibitionForm" property="matchList"><tr><td colspan="4" align="left">本频道无信息！</td></tr></logic:empty>
          </table>
        </div>
        
        <div class="more_red"><a href="/chinayachting/frontend/exhibition/MatchList.do?channelId=${exhibitionForm.channelId}" title="more&gt;&gt;"><span>more&gt;&gt;</span></a></div>
        </div>
    </div>
